﻿using IconYuan.Model.DTO.Products;
using SqlSugar;

namespace IconYuan.Model.Entity.Products
{
    /// <summary>
    /// 商品服务承诺
    /// </summary>
    [SugarTable("t_goods_sku")]
    public class Sku
    {
        /// <summary>
        /// 自增SKUID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int id { get; set; }
        /// <summary>
        /// 商品ID
        /// </summary>
        public int goods_id { get; set; }
        /// <summary>
        /// 商品SKU唯一标识,格式: 100_101
        /// </summary>
        public string goods_sku_id { get; set; } = string.Empty;
        /// <summary>
        /// SKU编码
        /// </summary>
        public string goods_sku_no { get; set; } = string.Empty;
        /// <summary>
        /// SKU图片ID
        /// </summary>
        public int image_id { get; set; }
        /// <summary>
        /// 商品价格（实际售价）
        /// </summary>
        public decimal goods_price { get; set; }
        /// <summary>
        /// 划线价格
        /// </summary>
        public decimal line_price { get; set; }
        /// <summary>
        /// 库存数量
        /// </summary>
        public int stock_num { get; set; }
        /// <summary>
        /// 商品重量(kg)
        /// </summary>
        public float goods_weight { get; set; }
        /// <summary>
        /// SKU 关联的多个规格(json格式)
        /// </summary>
        public object goods_props { get; set; } = string.Empty;
        /// <summary>
        /// SKU 关联的规格值ID集(json格式)
        /// </summary>
        public string spec_value_ids { get; set; } = string.Empty;
        public int store_id { get; set; }
        public DateTime create_time { get; set; }
        public DateTime update_time { get; set; }
    }
}
